<template>
	<view>加载中...</view>
</template>

<script>
	import { findInfoCustomer } from '../../api/serviceApi.js'
	export default {
		data() {
			return {
				option: {},
				detail: {}
			}
		},
		onLoad(option) {
			this.option = option
			this._findInfoCustomer()
		},
		methods: {
			async _findInfoCustomer() {
				const params = {id: this.option.id - 0}
				const res = await findInfoCustomer(params)
				console.log(res)
				// this.detail = res.data.data
				if (res.data.data.status === 3) {
					uni.showToast({title: '支付成功'})
					setTimeout(() => {
						uni.navigateTo({
							url: `paySuccess?id=${this.option.id}`
						})
					}, 2000)
				} else {
					uni.showToast({title: '支付失败',icon: 'none'})
					setTimeout(() => {
						uni.navigateTo({
							url: `payCost?id=${this.option.id}`
						})
					}, 2000)
				}
			},
		}
	}
</script>

<style lang="scss">
</style>
